< previous page page_290 next page >

Page 290
Public Sub trackNonUse(argMessage As Variant)
   Static bAuditActivated As Boolean, lElapsedTime As Long
   Const TIME_TO_CLOSE_SESSION = 900000 '15 mins
   bAuditActivated = False
   Do
       lElapsedTime = lElapsedTime + 1
       If lElapsedTime = TIME_TO_CLOSE_SESSION Then
          bAuditActivated = True
       End If
   Loop Until bAuditActivated = True
   'Insert code here to shut down session
   lElapsedTime = 0
End Sub
The variable bAuditActivated is a boolean flag that represents the change in state from an attended application to an unattended application. It is set to False so that, when you invoke it from a text box's change event or any mouse event, it is reset; that is, the occurrence of one of these events means that the application is not unattended. The constant TIME_TO_CLOSE_SESSION holds the maximum amount of time (in milliseconds) before the closing of a session. You could use this same method for desktop applications as well (although a Timer control might be better).
In addition, companies expect your applications, if deployed on the Web, to have some security mechanisms built in them to
Allow only paying customers into restricted areas on the site geared for premium content
Allow only employees of the company to access the Web site remotely
Completely disallow general, unrestricted access
Understanding Security Issues for Desktop Applications
When an application is to be deployed on several desktops, security concerns are less drastic than with the Internet, but are nonetheless important. Keep in mind that security threats do not necessarily come from subtle viruses that may hide in your system. Hackers have the ability to launch offensive attacks against Web-based applications such as your browser or email system. One Australian company, which custom designs email systems, had the misfortune of having a security fix for its email system reverse engineered by hackers. The hackers used the information in the code to strengthen their hack attacks.

 
< previous page page_290 next page >

If you like this book, buy it!